<!DOCTYPE html>

<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <title>Distribution / Learn Vimscript the Hard Way</title>
        <meta name="description" content="">
        <meta name="author" content="Steve Losh">
        <!--[if lt IE 9]>
            <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

        <link href="/static/styles/skeleton/base.css" rel="stylesheet" type="text/css" />
        <link href="/static/styles/skeleton/skeleton.css" rel="stylesheet" type="text/css" />
        <link href="/static/styles/skeleton/layout.css" rel="stylesheet" type="text/css" />

        <link href="/static/styles/tango.css" rel="stylesheet" type="text/css" />
        <link href="/static/styles/style.less" rel="stylesheet/less" type="text/css" />

        <script type="text/javascript" src="/static/scripts/less.js"></script>
    </head>

    <body class="">
        <div class="container">
            <header class="sixteen columns">
                <h1><a href="/">Learn Vimscript the Hard Way</a></h1>
            </header>

            
    <section class="nav three columns">
        
<ul>
<li><a href="#distribution">Distribution</a><ul>
<li><a href="#hosting">Hosting</a></li>
<li><a href="#documentation">Documentation</a></li>
<li><a href="#publicity">Publicity</a></li>
<li><a href="#exercises">Exercises</a></li>
</ul>
</li>
</ul>


        <div class="prevnext">
            
                <a class="prev" href="54.html">&laquo; Prev</a>
            
            
                <a class="next" href="56.html">Next &raquo;</a>
            
        </div>
    </section>

    <section class="content twelve columns offset-by-one">
        <div> 
<h1 id="distribution">Distribution</h1>
<p>By now you have the Vimscript skills to make Vim plugins many other people might
find useful.  This chapter will go over getting your plugins online and making
them easily available, as well as how to get the word out about them to
potential users.</p>
<h2 id="hosting">Hosting</h2>
<p>The first thing you'll need to do is get your plugin online so other people can
download it.  The canonical place for Vim plugins to live is <a href="http://www.vim.org/scripts/">the scripts
section of the Vim website</a>.</p>
<p>You'll need a free account on the website.  Once you've got one you can click
the "Add Script" link and fill out the form.  It should be pretty self
explanatory.</p>
<p>A recent trend in the past few years has been to distribute plugins by hosting
their repositories in a public place like Bitbucket or GitHub.  The rise in
popularity of this method can probably be attributed to two factors.  First,
Pathogen has made it trivial to keep each installed plugin's code in its own
separate location. The rise of distributed version control systems like
Mercurial and Git and public hosting sites like Bitbucket and GitHub has also
probably had an impact.</p>
<p>Providing repositories is handy for people who keep their dotfiles in
a version-controlled repository of their own.  Mercurial users can use
Mercurial's "subrepositories" to keep track of plugin versions, and Git users
can use submodules (though only for other Git repos, unlike Mercurial's
subrepos).</p>
<p>Having a full repository for each of your installed plugins also makes it easier
to debug when something goes wrong with them.  You can use blame, bisection, and
any of the other tools your VCS provides available to figure out what's going
on.  It's also easier to contribute fixes back if you already have the
repository on your machine.</p>
<p>Hopefully I've convinced you that you should also make your plugin's repository
available publicly.  It doesn't really matter which service you use, as long as
the repository is available <em>somewhere</em>.</p>
<h2 id="documentation">Documentation</h2>
<p>You've already documented your plugin thoroughly in Vim's internal help format,
but your job isn't quite over yet.  You're still going to want to come up with
a quick overview that summarizes a few things:</p>
<ol>
<li>What is your plugin all about?</li>
<li>Why would the user want to use it?</li>
<li>Why is it better than competing plugins (if any)?</li>
<li>What's the license?</li>
<li>A link to a pretty version of the full documentation, rendered by the
   <a href="http://vim-doc.heroku.com/">vim-doc</a> website.</li>
</ol>
<p>This should go in your README file (which will be displayed on the landing page
of Bitbucket and GitHub repos), and you can use it as the description for the
plugin's entry on Vim.org.</p>
<p>Including some screenshots is almost always a great idea.  Being a text-only
editor doesn't mean Vim doesn't have a user interface.</p>
<h2 id="publicity">Publicity</h2>
<p>Once you've got your plugin settled into all its various homes on the web: tell
the world about it!  You could share it with your followers on Twitter, post it
to the <a href="http://reddit.com/r/vim/">/r/vim</a> section of Reddit, write a blog entry about it on your own
personal website, and announce it on the <a href="http://www.vim.org/maillist.php">Vim mailing list</a> for starters.</p>
<p>Whenever you release a creation of yours into the wild you're going to get some
praise and some criticism.  Don't let negative words get to you too much.
Listen to what they say, but keep a thick skin and don't get too emotional when
someone points out flaws (valid or otherwise) in your work.  No one is perfect,
and this is the Internet, so you'll need to be able to take some heat and shrug
it off if you want to stay happy and motivated.</p>
<h2 id="exercises">Exercises</h2>
<p>Create an account on Vim.org if you don't already have one.</p>
<p>Look at the README files for some of your favorite plugins to see how they're
structured and what kind of information they include.</p></div>

        <div class="prevnext">
            
                <a class="prev" href="54.html">&laquo; Previous</a>
            
            
                <a class="next" href="56.html">Next &raquo;</a>
            
        </div>
    </section>


            <footer class="sixteen columns">
                Made by <a href="http://stevelosh.com">Steve Losh</a>.

                <a href="/license.html">License</a>.

                Built with
                <a href="http://bitbucket.org/sjl/bookmarkdown/">Bookmarkdown</a>.
            </footer>
        </div>

        
            <script type="text/javascript">
                var _gaq = _gaq || [];
                _gaq.push(['_setAccount', 'UA-15328874-8']);
                _gaq.push(['_trackPageview']);

                (function() {
                 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
                 })();
            </script>
        

        
            <script type="text/javascript">
                var _gauges = _gauges || [];
                (function() {
                 var t   = document.createElement('script');
                 t.type  = 'text/javascript';
                 t.async = true;
                 t.id    = 'gauges-tracker';
                 t.setAttribute('data-site-id', '4e8f83b7f5a1f546e200000d');
                 t.src = '//secure.gaug.es/track.js';
                 var s = document.getElementsByTagName('script')[0];
                 s.parentNode.insertBefore(t, s);
                 })();
             </script>
        
    </body>
</html>
